package edu.mju.eduorder.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: wyp
 * @Date: 2020/10/6 22:43
 */
@Component
public class ConstantQrCode  implements InitializingBean {

    @Value("${wx.pay.app_id}")
    private String appId;

    @Value("${wx.pay.mch_id}")
    private String mchId;

    @Value("${wx.pay.notify_url}")
    private String notifyUrl;

    @Value("${wx.pay.url}")
    private String url;

    @Value("${wx.pay.partnerkey}")
    private String partnerKey;

    public static String WX_PAY_APP_ID;
    public static String WX_PAY_MCH_ID;
    public static String WX_PAY_NOTIFY_URL;
    public static String WX_PAY_URL;
    public static String WX_PAY_PARTNER_KEY;



    @Override
    public void afterPropertiesSet() throws Exception {
        WX_PAY_APP_ID = appId;
        WX_PAY_MCH_ID = mchId;
        WX_PAY_NOTIFY_URL = notifyUrl;
        WX_PAY_URL = url;
        WX_PAY_PARTNER_KEY = partnerKey;
    }
}
